package com.heima.model.behavior;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 用户点赞、阅读、不喜欢的dto
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BehaviorDto implements Serializable {

    /**
     * 文章id
     */
    @JsonSerialize(using = ToStringSerializer.class)//把当前字段转换为字符串进行响应
    private Long articleId;

    /**
     * 0点赞，1取消点赞
     */
    private Short operation;

    /**
     * 0文章  1动态   2评论
     */
    private Short type;


}
